package com.netcracker.util.dao;

import com.netcracker.db.exception.DBException;
import com.netcracker.db.DBManager;
import com.netcracker.entity.Genre;
import com.netcracker.entity.record.GenreRecord;

import java.util.List;

public interface GenreDAO {

    public void setDBManager(DBManager dbManager);
    
    public void setDAOFacade(DAOFacade daoFacade);
    
    public void create(GenreRecord genre) throws DBException;

    public void edit(GenreRecord genre) throws DBException;

    public void remove(int genreID) throws DBException;

    public Genre find(int genreID) throws DBException;

    public Genre find(String name) throws DBException;
    
    public List<Genre> findBookGenres(int bookID) throws DBException;

    public List<Genre> findAll() throws DBException;

    public int count() throws DBException;

    public List<Integer> findBookGenreIds(int bookId) throws DBException;

}
